print("Player wave HUD being created!");

CurrentWave = 1
CurrentWaveTimeLeft = 0
WaveRunning = false
GameHasEnded = false

function inv_wavehud()
	draw.RoundedBox( 1, 0, 0, ScrW(), 24, Color( 35, 50, 160, 95 ))
	draw.SimpleText( "Time Left: " .. tostring(CurrentWaveTimeLeft), "MenuLarge", ScrW() - 128, 5, Color( 255, 255, 255, 120 ),0,0)
	if(GameHasEnded == false)then
		if INV_WAVES[CurrentWave][INV_WAVE_BOSS] == true then
			draw.SimpleText( "Wave: " .. tostring(CurrentWave) .. " (Boss)/" .. tostring(#INV_WAVES), "MenuLarge", (ScrW() / 2) - 64, 5, Color( 255, 255, 255, 120 ),0,0)
		else
			draw.SimpleText( "Wave: " .. tostring(CurrentWave) .. "/" .. tostring(#INV_WAVES), "MenuLarge", (ScrW() / 2) - 64, 5, Color( 255, 255, 255, 120 ),0,0)
		end
	else
		draw.SimpleText( "Game over", "MenuLarge", (ScrW() / 2) - 64, 5, Color( 255, 255, 255, 120 ),0,0)
	end
end
hook.Add("HUDPaint", "inv_wavehud", inv_wavehud)

function inv_clientsidecountdown()
	if WaveRunning == true and GameHasEnded == false and INV_CLIENTSIDECOUNTDOWN == true then
		CurrentWaveTimeLeft = CurrentWaveTimeLeft - 1
	end
end
timer.Create( "inv_clientsidecountdown", 1, 0, inv_clientsidecountdown)